<template>
	<view class="func_menu">

		<fui-grid>
			<fui-grid-item v-for="(item) in list" :key="item.id" @click="to_list(item)">
				<view class="fui-grid__cell">
					<view style="margin-top: 15rpx;">
						<image :src=item.img alt="" style="width: 100rpx; height: 100rpx;" />
					</view>
					<text>{{item.title}}</text>
				</view>
			</fui-grid-item>
		</fui-grid>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: [{
						"id": 0,
						"title": "待办",
						"img": "/static/icon/list.png"
					},
					{
						"id": 1,
						"title": "智能报账",
						"img": "/static/icon/bill.png"
					},
					{
						"id": 2,
						"title": "文件扫描",
						"img": "/static/icon/scan.png"
					},{
						"id": 3,
						"title": "物流查询",
						"img": "/static/icon/materialflow.png"
					}

				]
			}
		},
		methods: {
			to_list(ploay) {
				switch (ploay.id) {
					case 0:
						uni.navigateTo({
							url: "/pages/function/todo/index",

						})
						break

					case 1:
						uni.navigateTo({
							url: "/pages/function/bill/index"
						})
						break

					default:
						break
				}
			}
		},
		mounted() {

		}
	}
</script>

<style scoped>
	.fui-grid__cell {
		text-align: center;
		line-height: calc();
	}
</style>